<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\modules\backendext\models\BackendExtensions */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="backend-extensions-form">

    <?php $form = ActiveForm::begin(); ?>

    <?php echo Html::hiddenInput('urlReferrer',!empty($list['urlReferrer']) ? $list['urlReferrer'] : null);?>
    
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('debug', 'Create') : Yii::t('debug', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>
    <p><?=$model->getAttributeLabel('i18n')?>表单的TAB名称</p>
    <?= $form->field($model, 'i18n')->textInput(['maxlength' => true]) ?>

    <p>標識</p>
    <?= $form->field($model, 'type_key')->textInput(['maxlength' => true]) ?>

    
    <?= $form->field($model, 'status')->checkbox() ?>
    
    <p><?=$model->getAttributeLabel('namespace')?>为扩展入口的表单的class 。e.g.:backend\extensions\Extension 这个对象是要继承ExtensionForm</p>
    <?= $form->field($model, 'namespace')->dropDownList($list['dropDownClass'], ['prompt'=>'--select--']) ?>
    
    <p><?=$model->getAttributeLabel('target_class')?>为入口表单的MODEL。e.g.:backend\models\Page, 这个对象要use \backend\components\models\ModelTrait;才能生效</p>
    <?= $form->field($model, 'target_class')->textInput(['maxlength' => true]) ?>
    
    <?= $form->field($model, 'type')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'sort_order')->textInput() ?>

    <?= $form->field($model, 'layout')->textInput() ?>
    <p>0為tabs, 1為默認的active頁面</p>
    <?php ActiveForm::end(); ?>

</div>
